3.80 \(\int \frac{\tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

Optimal. Leaf size=110 \[ \frac{1}{16 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{1}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac{i x}{16 a^4}+\frac{1}{12 a d (a+i a \tan (c+d x))^3}-\frac{1}{8 d (a+i a \tan (c+d x))^4} \]

[Out]

((-I/16)*x)/a^4 - 1/(8*d*(a + I*a*Tan[c + d*x])^4) + 1/(12*a*d*(a + I*a*Tan[c + d*x])^3) + 1/(16*d*(a^2 + I*a^
2*Tan[c + d*x])^2) + 1/(16*d*(a^4 + I*a^4*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0807473, antiderivative size = 110, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {3526, 3479, 8} \[ \frac{1}{16 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{1}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac{i x}{16 a^4}+\frac{1}{12 a d (a+i a \tan (c+d x))^3}-\frac{1}{8 d (a+i a \tan (c+d x))^4} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]/(a + I*a*Tan[c + d*x])^4,x]

[Out]

((-I/16)*x)/a^4 - 1/(8*d*(a + I*a*Tan[c + d*x])^4) + 1/(12*a*d*(a + I*a*Tan[c + d*x])^3) + 1/(16*d*(a^2 + I*a^
2*Tan[c + d*x])^2) + 1/(16*d*(a^4 + I*a^4*Tan[c + d*x]))

Rule 3526

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*(a + b*Tan[e + f*x])^m)/(2*a*f*m), x] + Dist[(b*c + a*d)/(2*a*b), Int[(a + b*Tan[e + f*x])^(m + 1),
 x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0]

Rule 3479

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(a + b*Tan[c + d*x])^n)/(2*b*d*n), x] +
Dist[1/(2*a), Int[(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\tan (c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=-\frac{1}{8 d (a+i a \tan (c+d x))^4}-\frac{i \int \frac{1}{(a+i a \tan (c+d x))^3} \, dx}{2 a}\\ &=-\frac{1}{8 d (a+i a \tan (c+d x))^4}+\frac{1}{12 a d (a+i a \tan (c+d x))^3}-\frac{i \int \frac{1}{(a+i a \tan (c+d x))^2} \, dx}{4 a^2}\\ &=-\frac{1}{8 d (a+i a \tan (c+d x))^4}+\frac{1}{12 a d (a+i a \tan (c+d x))^3}+\frac{1}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac{i \int \frac{1}{a+i a \tan (c+d x)} \, dx}{8 a^3}\\ &=-\frac{1}{8 d (a+i a \tan (c+d x))^4}+\frac{1}{12 a d (a+i a \tan (c+d x))^3}+\frac{1}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{1}{16 d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac{i \int 1 \, dx}{16 a^4}\\ &=-\frac{i x}{16 a^4}-\frac{1}{8 d (a+i a \tan (c+d x))^4}+\frac{1}{12 a d (a+i a \tan (c+d x))^3}+\frac{1}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{1}{16 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.313322, size = 94, normalized size = 0.85 \[ \frac{\sec ^4(c+d x) (32 i \sin (2 (c+d x))+24 d x \sin (4 (c+d x))+3 i \sin (4 (c+d x))+16 \cos (2 (c+d x))+(-3-24 i d x) \cos (4 (c+d x)))}{384 a^4 d (\tan (c+d x)-i)^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(Sec[c + d*x]^4*(16*Cos[2*(c + d*x)] + (-3 - (24*I)*d*x)*Cos[4*(c + d*x)] + (32*I)*Sin[2*(c + d*x)] + (3*I)*Si
n[4*(c + d*x)] + 24*d*x*Sin[4*(c + d*x)]))/(384*a^4*d*(-I + Tan[c + d*x])^4)

________________________________________________________________________________________

Maple [A]  time = 0.025, size = 116, normalized size = 1.1 \begin{align*}{\frac{{\frac{i}{12}}}{d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}}}-{\frac{{\frac{i}{16}}}{d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) }}-{\frac{1}{8\,d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) ^{4}}}-{\frac{1}{16\,d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) ^{2}}}-{\frac{\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{32\,d{a}^{4}}}+{\frac{\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{32\,d{a}^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)/(a+I*a*tan(d*x+c))^4,x)

[Out]

1/12*I/d/a^4/(tan(d*x+c)-I)^3-1/16*I/d/a^4/(tan(d*x+c)-I)-1/8/d/a^4/(tan(d*x+c)-I)^4-1/16/d/a^4/(tan(d*x+c)-I)
^2-1/32/d/a^4*ln(tan(d*x+c)-I)+1/32/d/a^4*ln(tan(d*x+c)+I)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.26946, size = 163, normalized size = 1.48 \begin{align*} \frac{{\left (-24 i \, d x e^{\left (8 i \, d x + 8 i \, c\right )} + 24 \, e^{\left (6 i \, d x + 6 i \, c\right )} - 8 \, e^{\left (2 i \, d x + 2 i \, c\right )} - 3\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{384 \, a^{4} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/384*(-24*I*d*x*e^(8*I*d*x + 8*I*c) + 24*e^(6*I*d*x + 6*I*c) - 8*e^(2*I*d*x + 2*I*c) - 3)*e^(-8*I*d*x - 8*I*c
)/(a^4*d)

________________________________________________________________________________________

Sympy [A]  time = 2.3523, size = 158, normalized size = 1.44 \begin{align*} \begin{cases} \frac{\left (6144 a^{8} d^{2} e^{14 i c} e^{- 2 i d x} - 2048 a^{8} d^{2} e^{10 i c} e^{- 6 i d x} - 768 a^{8} d^{2} e^{8 i c} e^{- 8 i d x}\right ) e^{- 16 i c}}{98304 a^{12} d^{3}} & \text{for}\: 98304 a^{12} d^{3} e^{16 i c} \neq 0 \\x \left (- \frac{\left (i e^{8 i c} + 2 i e^{6 i c} - 2 i e^{2 i c} - i\right ) e^{- 8 i c}}{16 a^{4}} + \frac{i}{16 a^{4}}\right ) & \text{otherwise} \end{cases} - \frac{i x}{16 a^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+I*a*tan(d*x+c))**4,x)

[Out]

Piecewise(((6144*a**8*d**2*exp(14*I*c)*exp(-2*I*d*x) - 2048*a**8*d**2*exp(10*I*c)*exp(-6*I*d*x) - 768*a**8*d**
2*exp(8*I*c)*exp(-8*I*d*x))*exp(-16*I*c)/(98304*a**12*d**3), Ne(98304*a**12*d**3*exp(16*I*c), 0)), (x*(-(I*exp
(8*I*c) + 2*I*exp(6*I*c) - 2*I*exp(2*I*c) - I)*exp(-8*I*c)/(16*a**4) + I/(16*a**4)), True)) - I*x/(16*a**4)

________________________________________________________________________________________

Giac [A]  time = 1.28691, size = 119, normalized size = 1.08 \begin{align*} \frac{\frac{12 \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{4}} - \frac{12 \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{4}} + \frac{25 \, \tan \left (d x + c\right )^{4} - 124 i \, \tan \left (d x + c\right )^{3} - 246 \, \tan \left (d x + c\right )^{2} + 252 i \, \tan \left (d x + c\right ) + 57}{a^{4}{\left (\tan \left (d x + c\right ) - i\right )}^{4}}}{384 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

1/384*(12*log(tan(d*x + c) + I)/a^4 - 12*log(tan(d*x + c) - I)/a^4 + (25*tan(d*x + c)^4 - 124*I*tan(d*x + c)^3
 - 246*tan(d*x + c)^2 + 252*I*tan(d*x + c) + 57)/(a^4*(tan(d*x + c) - I)^4))/d